package com.zgjkhis.modules.system.service;

import com.alibaba.fastjson.JSONObject;
import com.zgjkhis.common.service.BaseService;
import com.zgjkhis.modules.charges.domain.PrescriptionOrder;
import com.zgjkhis.modules.outpatient.dto.ChargeOrderCriteria;
import com.zgjkhis.modules.outpatient.dto.RefundOrderDto;
import com.zgjkhis.modules.system.domain.ApiChannel;
import com.zgjkhis.modules.system.domain.Info;
import com.zgjkhis.modules.system.domain.InfoDrug;
import com.zgjkhis.modules.system.domain.Order;
import com.zgjkhis.modules.system.domain.vo.RefundOrderVO;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @Author yzq
 * @Description 订单
 * @Date 2021/6/23 9:45
 * @Param
 * @return
 **/
public interface OrderService extends BaseService<Order>{

    JSONObject createOrder(String data, ApiChannel apiChannel);

    ResponseEntity<Object> refundOrder(RefundOrderVO refundOrderVO, PrescriptionOrder order);

    Object chargeOrder(ChargeOrderCriteria criteria);

    /**
     * 订单调剂
     * @param list
     * @param tempOrder
     * @param info
     */
    void confirmOrder(List<InfoDrug> list, Order tempOrder, Info info);

    /**
     * 本地单退款
     * @param refundOrderDto
     * @param order
     */
    ResponseEntity<Object> refundLocalOrder(RefundOrderDto refundOrderDto, Order order);

}
